﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://www.codeplex.com/EmlenMud
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using BrainTechLLC.ThreadSafeObjects;
using System.Runtime.Serialization;
using System.Reflection;

namespace BrainTechLLC
{
    [Flags]
    [DataContract]
    public enum ScheduleOptions
    {
        [EnumMember]
        None = 0,
        [EnumMember]
        ScheduleFromStartTime = 1,
        [EnumMember]
        ScheduleRepeatingMS = 2,
        [EnumMember]
        ScheduleAtTime = 4
    }

    [Serializable]
    [DataContract]
    public class ScheduledTime
    {
        [DataMember]
        public ScheduleOptions Options { get; set; }

        [DataMember]
        public int DelayMS { get; set; }

        [DataMember]
        public DateTime ScheduleTime { get; set; }

        public ScheduledTime() { }
        public ScheduledTime(int delayMS, ScheduleOptions options) { DelayMS = delayMS; Options = options; }
        public ScheduledTime(DateTime dt, ScheduleOptions options) { ScheduleTime = dt; Options = options; }
    }
}